﻿<%@ Page Language="C#" MasterPageFile="~/JOINT/MstPage_JOINT.master" ValidateRequest="false" AutoEventWireup="true" CodeFile="frmJ_StaffWorkSkillInput.aspx.cs" Inherits="JOINT_frmJ_StaffWorkSkillInput" Title="Untitled Page" Culture="ja-JP" uiCulture="ja" %>
<asp:Content ID="Content1" ContentPlaceHolderID="head" Runat="Server">
業務スキル情報登録
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="ContentPlaceHolder1" Runat="Server">
    <link href="../Style/JsStyle.css" rel="stylesheet" type="text/css" />
 <%--<div class="titlepage">
     <asp:Label ID="lbl_titlePage" runat="server" Text="titlePage"></asp:Label>
 </div>
 <div class="titleHeader">
    <asp:Label ID="lbl_titleHeader"  runat="server" Text="業務スキル情報入力"></asp:Label>
 </div>
 --%> <div class="maindiv1">
        
   
   <script type="text/javascript" src="../Js/jquery.min.js"></script>
   <script type="text/javascript" src="../Js/jquery.alphanumeric.pack.js"></script>
   <script type="text/javascript" src="../Js/jquery.maskedinput.js"></script>
   <script type="text/javascript" src="../js/Validation.js"></script>
   <script language="javascript" type="text/javascript">
      function validatDateNow(oSrc, args)// kiem tra ngay thang hien tai.
    {
       args.IsValid = checkYearOld(args.Value, getNowDate(new Date()), 0, "<");


    }
    
     function validatDateCheck(id)// kiem tra ngay thang hien tai.
    {
        var check = '';
        var dateinput = document.getElementById(id).value;
        var year_input = dateinput.substr(0, 4);
        var day_input1 = dateinput.substr(8, 2);
        var month_input = dateinput.substr(5, 2);
        var currentTime = new Date();
        var year_now = currentTime.getFullYear();
        var month_now = currentTime.getMonth() + 1;
        var day_now1 = currentTime.getDate();

        if (year_input == year_now) {
            if (month_input == month_now) {
                if (day_input1 <= day_now1) {
                    check = 'true';
                }
                else {
                    check = 'false';
                }

            }
            else if (month_input < month_now) {
                check = 'true';
            }
            else {
                check = 'false';
            }

        }
        else if (year_input < year_now) {
            check = 'true';
        }
        else
            check = 'false';

        return check;
    }
    
    
    
    function mysplit(date) {
    var mydate = document.getElementById(date).value;
    if(mydate.length == 8)
    {
        var year = mydate.substr(0, 4);
        var month = mydate.substr(4, 2);
        var day = mydate.substr(6, 2);
        document.getElementById(date).value = year + '/' + month + '/' + day;
    }
    else
    {
       document.getElementById(date).value = ""; 
    }
}

function mysplitFocus(date) {
    var myvalue = document.getElementById(date).value;
    if(myvalue.length == 10)
    {
        var arr= myvalue.split("/");
        //alert(arr[0]+arr[1]+arr[2]);
        var lengthdate = arr[0]+arr[1]+arr[2];
       document.getElementById(date).value = lengthdate ;
    }
   
}   
    
    function numbersonly(myfield, e, dec)
{
var key;
var keychar;

if (window.event)
   key = window.event.keyCode;
else if (e)
   key = e.which;
else
   return true;
keychar = String.fromCharCode(key);

// control keys
if ((key==null) || (key==0) || (key==8) || 
    (key==9) || (key==13) || (key==27) || (key == 13) ) 
   return true;

// numbers
else if ((("0123456789").indexOf(keychar) > -1))
   return true;

// decimal point jump
else if (dec && (keychar == "."))
   {
   myfield.form.elements[dec].focus();
   return false;
   }
else
   return false;
}
  
  

                   
$(document).ready(function() {
     registerEnterEvent("enter", "<%= btn_登録.ClientID %>", 4);
     registerControlToValidation("validation");
     formatDate("css_text_calender", "/");
 });              
             
  
  
  
  
  
  
  </script>
  <style type="text/css">
    .imemode_active
    {
    	ime-mode: active;
    }
</style>      
        
        
        
        
        <div class="Header1">
            ＊: 必須.</div>
              <div class="NoteStyle">※下記の情報があれば、必須項目を入力してください。なければ、次ボタンを押してください。</div>

        <div>&nbsp;</div>
        
         <%--<div style="display: none;">
            <asp:TextBox ID="TextBox1" runat="server"></asp:TextBox>
            <asp:RequiredFieldValidator runat="server" ID="RequiredFieldValidator1"
                        ControlToValidate="TextBox1"
                        Display="None"
                        ErrorMessage="TextBox1: display none." />
        </div>--%>
        <div class="detail-admin-row">
            <span class="detail-admin-label">業務スキル名 :</span>
            <asp:DropDownList ID="ddl業務スキル名" runat="server" Width="150px" ValidationGroup="detailForm" CssClass="Font_textbox validation enter">
            <asp:ListItem Value="-1" selected="true">[選択]</asp:ListItem>
            </asp:DropDownList><span class="required-field"> *</span>
        
        <asp:RequiredFieldValidator 
            runat="server" 
            ID="validate_ddl業務スキル名"
            ControlToValidate="ddl業務スキル名"
            Display="None"
            SetFocusOnError="false"
            InitialValue ="-1"
            ErrorMessage="" >
        </asp:RequiredFieldValidator> 
       
       <ajaxToolkit:ValidatorCalloutExtender runat="Server" ID="ValidatorCalloutExtender1"
       
        TargetControlID="validate_ddl業務スキル名" HighlightCssClass = "invalid" Width="260px"
        CssClass="CustomValidatorCalloutStyle" WarningIconImageUrl="../Images/warning.png" />
        
        
        
          <asp:CustomValidator runat="server" ID="CustomValidator1"   OnServerValidate="CustomValidate業務スキル名"
      ErrorMessage="" ControlToValidate="ddl業務スキル名" Display="None"    SetFocusOnError="false" >
        </asp:CustomValidator>
          <ajaxToolkit:ValidatorCalloutExtender runat="Server" ID="ValidatorCalloutExtender8"
        TargetControlID="CustomValidator1" HighlightCssClass = "invalid" Width="260px"
        CssClass="CustomValidatorCalloutStyle" WarningIconImageUrl="../Images/warning.png" />
        
        
        
        
         
        
        </div>
        
        <div class="detail-admin-row">
            <span class="detail-admin-label">レベル :</span>
            <asp:TextBox ID="txtレベル" runat="server" Width="150px" MaxLength="100" ValidationGroup="detailForm" CssClass="Font_textbox imemode_active validation enter"></asp:TextBox><span class="required-field"> *</span>
       
       
        <asp:RequiredFieldValidator 
            runat="server" 
            ID="validate_txtレベル"
            ControlToValidate="txtレベル"
            Display="None"
            SetFocusOnError="false"
            ErrorMessage="" >
        </asp:RequiredFieldValidator> 
       
       <ajaxToolkit:ValidatorCalloutExtender runat="Server" ID="ValidatorCalloutExtender2"
       
        TargetControlID="validate_txtレベル" HighlightCssClass = "invalid" Width="260px"
        CssClass="CustomValidatorCalloutStyle" WarningIconImageUrl="../Images/warning.png" /> 
       
       
       </div>
       <div class="detail-admin-row">
            <span class="detail-admin-label">発行機関 :</span>
            <asp:TextBox ID="txt発行機関" runat="server" ValidationGroup="detailForm" Width="314px" MaxLength="200" CssClass="Font_textbox imemode_active validation enter" ></asp:TextBox><span class="required-field"> *</span>
        
        
        
        <asp:RequiredFieldValidator 
            runat="server" 
            ID="validate_txt発行機関"
            ControlToValidate="txt発行機関"
            Display="None"
            SetFocusOnError="false"
            ErrorMessage="" >
        </asp:RequiredFieldValidator> 
       
       <ajaxToolkit:ValidatorCalloutExtender runat="Server" ID="ValidatorCalloutExtender3"
       
        TargetControlID="validate_txt発行機関" HighlightCssClass = "invalid" Width="260px"
        CssClass="CustomValidatorCalloutStyle" WarningIconImageUrl="../Images/warning.png" />
        
        
        
        
        </div>
        <div class="detail-admin-row">
            <span class="detail-admin-label">発行日 :</span>
            <asp:TextBox ID="txt発行日" runat="server" ValidationGroup="detailForm" CssClass="Font_textbox validation enter css_text_calender"  onkeypress="return numbersonly(this, event);" style="ime-mode:disabled"
                Width="150px" MaxLength = "8"></asp:TextBox><span class="required-field"> 
                    <asp:ImageButton ID="imb発行日" runat="server" Height="19px"  CssClass="cal_Img"  ImageUrl="~/Images/calendar.jpg" ValidationGroup="detail"/></span><span class="required-field"> *</span></div>
                     <ajaxToolkit:CalendarExtender ID="CalendarExtender1" runat="server" PopupButtonID="imb発行日"  Format="yyyy/MM/dd"
                            TargetControlID="txt発行日">
                     </ajaxToolkit:CalendarExtender>
   
          <asp:RequiredFieldValidator 
            runat="server" 
            ID="RequiredFieldValidator2"
            ControlToValidate="txt発行日"
            Display="None"
            SetFocusOnError="false"
            ErrorMessage="" >
        </asp:RequiredFieldValidator> 
       
       <ajaxToolkit:ValidatorCalloutExtender runat="Server" ID="ValidatorCalloutExtender4"
       
        TargetControlID="RequiredFieldValidator2" HighlightCssClass = "invalid" Width="260px"
        CssClass="CustomValidatorCalloutStyle" WarningIconImageUrl="../Images/warning.png" />
          
          <%--<asp:RegularExpressionValidator runat="server" ID ="validate_regular_txt発行日" ControlToValidate="txt発行日"  ValidationExpression="^((((19|20)(([02468][048])|([13579][26]))[- /.]02[- /.]29))|((20[0-9][0-9])|(19[0-9][0-9]))[- /.]((((0[1-9])|(1[0-2]))[-  /.]((0[1-9])|(1\d)|(2[0-8])))|((((0[13578])|(1[02]))[- /.]31)|(((0[1,3-9])|(1[0-2]))[- /.](29|30)))))$" ErrorMessage="" Display="none" SetFocusOnError="false" ></asp:RegularExpressionValidator>--%>
            <asp:CustomValidator runat="server" ID="CustomValidator2"  ClientValidationFunction="isDate"
                ErrorMessage="" ControlToValidate="txt発行日" Display="None"    SetFocusOnError="false" >
             </asp:CustomValidator>
             
            <ajaxToolkit:ValidatorCalloutExtender runat="Server" ID="ValidatorRegular1"
            TargetControlID="CustomValidator2" HighlightCssClass = "invalid" Width="260px"
            CssClass="CustomValidatorCalloutStyle" WarningIconImageUrl="../Images/warning.png" /> 
         
         
         
          <asp:CustomValidator runat="server" ID="validateday_Custom"  ClientValidationFunction="validatDateNow"
      ErrorMessage="" ControlToValidate="txt発行日" Display="None"    SetFocusOnError="false" >
        </asp:CustomValidator>
          <ajaxToolkit:ValidatorCalloutExtender runat="Server" ID="ValidatorCustom1"
        TargetControlID="validateday_Custom" HighlightCssClass = "invalid" Width="260px"
        CssClass="CustomValidatorCalloutStyle" WarningIconImageUrl="../Images/warning.png" />
         
         
         
         
       
   
   
   
   
        
  <div class="detail-admin-row">
            <span class="detail-admin-label">&nbsp;</span>
             <asp:Button ID="btn_登録" runat="server" Text="登録" CssClass="btn" OnClientClick="javascript:focusToControlErr();" 
                 OnClick="btn_登録_Click"  />
            &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
             <asp:Button ID="btn_リセット" runat="server" Text="リセット" CssClass="btn"  ValidationGroup="detail"
                OnClick="btn_リセット_Click" />
         </div>
         
        
</div>
<div class="detail-admin-row" >
             <div class="btn_back">
                <asp:Button ID="btn_戻る"  runat="server" Text="←戻る" OnClick="btn_戻る_Click" CssClass="btn" ValidationGroup="detail"/>
             </div>
             <div class="btn_next btn_next_fixedforfrmJ_StaffBasicInfoInput">
                 <asp:Button ID="btn_次"  runat="server" Text="次→" OnClick="btn_次_Click" CssClass="btn" ValidationGroup="detail" />
             </div>
         </div>
  <div>&nbsp;</div>
  <br />     
</asp:Content>


